﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Code.Models
{
    /// <summary>
    /// 用户在线状态
    /// </summary>
    public enum UserOnlineState
    {
        /// <summary>
        /// 在线
        /// </summary>
        OnLine = 1,
        /// <summary>
        /// 离线
        /// </summary>
        DowLine = 2
    }
    public static class UserOnlineStateEx
    {
        public static string GetName(this UserOnlineState state)
        {
            switch (state)
            { 
                case UserOnlineState.DowLine:
                    return "离线";
                case UserOnlineState.OnLine:
                    return "在线";
                default:
                    return "";
            }
        }
    }
}
